package com.songshuai.webapi.jobapi.controller;



import com.songshuai.webapi.jobapi.dto.base.QueryResponse;
import com.songshuai.webapi.jobapi.service.HealthCheckService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api("健康监测")
@RestController
public class HealthCheckController {

    @Autowired
    private HealthCheckService healthCheckService;

    @ApiOperation(value="健康监测")
    @RequestMapping(value = "api/health/healthcheck", method = RequestMethod.GET)
    public QueryResponse<Integer> HealthCheck(){
        return QueryResponse.setResData(healthCheckService.getCheckResult());
    }
}
